package team.star.werespos.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * OrderDetail class<br/>
 * 订单项
 * @author hdonghong
 * @since 2019/05/04
 */
@TableName("`order_detail`")
@Data
@Accessors(chain = true)
public class OrderDetail implements Serializable {

    private static final long serialVersionUID = -3579667866489817173L;

    @TableId
    @JsonIgnore
    private Integer orderDetailId;

    /** 关联的订单 */
    @JsonIgnore
    private Integer orderId;

    /** 关联的菜品 */
    private Integer foodId;

    /** 菜品名 */
    private String foodName;

    /** 菜品价格 */
    private BigDecimal foodPrice;

    /** 点菜数量 */
    private Integer foodQuantity;

    /** 菜品图 */
    private String foodIcon;

    @JsonIgnore
    @TableLogic
    private Integer isDel;

    @JsonIgnore
    private Instant createTime;

    @JsonIgnore
    private Instant updateTime;
}
